package com.xsz.pda.data.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.xsz.pda.data.bean.GroupType

@Dao
interface GroupTypeDao {

    @Insert
    fun insertAll(typeGroupList: List<GroupType>)

    @Query("delete from groupType")
    fun deleteAll()

    @Query("select * from groupType where typeId = :typeId")
    fun queryTypeGroup(typeId: String): List<GroupType>

    @Query("select * from grouptype where groupId=:groupId limit 1")
    fun queryByGroupId(groupId: String): GroupType?

    @Query("select * from groupType")
    fun listAll(): List<GroupType>


}